<li class="answer-item clearfix _j_answer_item _js_answer18519002 " data-aid="18519002">
    <div class="answer-content _js_answer_content">
        <div class="answer-info clearfix">
            <div class="user-bar fl">
                <a class="_j_filter_click avatar" href="/wenda/u/86525799/answer.html" target="_blank"><img src="${c.headUrl}" width="48" height="48" class="photo"></a>
                <a class="name" href="/wenda/u/86525799/answer.html" target="_blank">${c.username}</a>
                <a class="level" href="/rank/lv.php?uid=86525799" target="_blank" rel="nofollow">${c.level}</a>
            </div>
        </div>

        <div class="_j_long_answer_item">
            <div class="_j_answer_html"><div class="area_tags _j_tip_mdd" data-mddid="14786">
            ${c.content}
                <br>
                如果你觉得TA的回答不错，快来给TA点个赞吧！<br>
                你的支持是对作者莫大的鼓励~</div>
            </div>
        </div>
        <!-- 问答版权名片 -->
        <div class="a-operate _js_operate clearfix">
            <div class="fl">
                <!-- 问题分享 -->
                <div class="q-share cate-share">
                    <a class="_js_showShare"><i class="q-share-icon"></i>分享</a>
                    <div class="share-pop _j_share_pop hide clearfix" data-title="和女朋友一起旅游，目的地选择哪儿" data-qid="18512843" data-aid="18519002">
                        <a title="分享到新浪微博" class="sina _j_do_share" data-site="wb" data-username="花开成海_Smile"></a>
                        <a title="分享到QQ空间" class="zone _j_do_share" data-site="qz" data-username="花开成海_Smile"></a>
                        <a title="分享到微信" class="weixin _j_do_share_wx" data-site="wx" data-username="花开成海_Smile"></a>
                    </div>
                </div>
                <div class="cmt-toggle">
                    <a class="_js_slideComment" data-cnum="0" data-default_words="添加评论"><i></i><span>添加评论</span></a>
                </div>
                <div class="collect">
                    <a class="_j_collect_answer"><i></i>收藏</a>
                </div>
                <div class="pub-time">
                    <i class="ico_phone"></i> <span>${(c.createTime)?string("yyyy-MM-dd HH:mm")}</span>
                </div>
                <div class="tip-off">
                    <a data-japp="report" data-refer="http://www.mafengwo.cn/wenda/detail-18512843.html#answer18519002" data-refer-uid="86525799" data-app="qa.answer" data-busi-id="aid:18519002">举报</a>
                </div>
            </div>
            <div class="fr">
                <a class="btn-adopt _js_just_you">采纳为最佳答案</a>
            </div>
        </div>

        <div class="comment-wrap _js_comments is_foldup_detail">
         <#if c.state == 1>
            <div class="comment-add clearfix _j_word">
                <div class="_js_comment_list">
                    <ul class="comment-list _j_comment_list_ul">
                        <li class="comment-item clearfix" data-cid="18247834" data-username="">
                            <div class="comment-user">
                                <a href="/u/46470179.html" target="_blank"><img src="${(c.refComent.headImgUrl)!}" class="photo"></a>
                            </div>
                            <dl>
                                <dt>
                                    <a href="/u/46470179.html" target="_blank" class="c-name">${(c.refComent.username)!}</a>
                                    <a href="/rank/lv.php?uid=46470179" class="level" target="_blank">${(c.refComent.level)!}</a>
                                ${(c.refComent.content)!}
                                    还有更多更多未知，想去探索，期待能和志同道合的小伙伴一起出发
                                </dt>
                                <dd>
                                    <div class="c-info">
                                        <span class="c-time fl">${(c.refComent.createTime)!}</span>
                                        <span class="c-like _j_comment_like" data-cid="18247834" data-num="0">
                                                 <a class="btn-like" role="button" data-t="false"></a>
                                            <font class="dianzan" data-t="1">赞</font>
                                    </span>
                                        <a  role="button"  class="c-reply _j_publish_reply fr btn_hui" href="#ct" data-touser="${c.username!}" data-toid="${c.id!}">回复</a>
                                        <a class="c-report fr" data-japp="report" data-refer="http://www.mafengwo.cn/wenda/detail-6892931-13651654.html" data-refer-uid="46470179" data-app="qa.answer.comment" data-busi-id="cid:18247834">举报</a>
                                    </div>
                                </dd>
                            </dl>
                        </li>
                    </ul>
                </div>
            </div>
              </#if>
             <#if c.state == 0>
            <div class="comment-add clearfix _j_word">
                    <textarea id="ct" style="width: 100%;" name="content" class="_j_content _j_word_check"></textarea>
                    <input class="btn-comment _j_publish_comment btn_fu" type="button"  value="回复" data-touser="${(c.username)!}" data-toid="${(c.id)!}">
                </form>
        </div>
             </#if>
    </li>
<script>
    $(".btn_fu").click(function () {

        //上一个评论用户的用户名
        var touser = $(this).data("touser");
        //上一个评论用户的mongoDB id
        var toid = $(this).data("toid");
        /*    $("#ct").focus();
            $("#ct").attr("placeholder","回复：" + touser );*/
        var content = $(this).prev();
        $("#commentType").val(1);
        $("#refCommentId").val(toid);
        $("#answerId").val(toid);
        $("#context").val($(content).val());
        console.log($("#context").val());
        $("#tianchong").ajaxSubmit(function (data) {
            $(content).val("");
            /*$(".comment-add").append(data);*/
            window.location.reload();
        })
    });
    $(function () {
        $(".dianzan").click(function () {
            var a = $(this);
            var flag = $(this).attr("data-t");
            if(flag == 1){
                $(a).attr("data-t","");
                $(a).attr("data-t","0");
                $(a).css("color","orange");
            }else{
                $(a).attr("data-t","");
                $(a).attr("data-t","1");
                $(a).css("color","#999");
            }
        })
    })
</script>